#ifndef TLABEL_H
#define TLABEL_H

#include "qwt3d_plot.h"
#include <QVector>

enum LabelType { ltNODE, ltTIME };

class TLabel : public Qwt3D::LinearScale
{
    QVector< double > * vals;
    LabelType lType;

public:
  explicit TLabel( LabelType t, QVector< double > * data = 0 );
  Scale * clone() const;
  QString ticLabel( unsigned int idx ) const;

protected:
  TLabel();

};

/*
class Imaginary : public LinearScale
{
public:
  Scale* clone() const {return new Imaginary;}
  QString ticLabel(unsigned int idx) const
  {
    if (idx<majors_p.size())
    {
      double val = majors_p[idx];
      if (val)
        return QString::number(val) + "*i";
      return QString::number(val);
    }
    return QString("");
  }
};

class TimeItems : public LinearScale
{
public:
  Scale* clone() const {return new TimeItems;}
  QString ticLabel(unsigned int idx) const
  {
    if (idx<majors_p.size())
    {
      QTime t = QTime::currentTime();
      int h = t.hour();
      int m = t.minute();
      if (m+idx > 59)
      {
        if (h==23)
          h=0;
        else
          h+=1;
        m = (m+idx) % 60;
      }
      else
        m += idx;

      return QTime(h,m).toString("hh:mm")+"h";
    }
    return QString("");
  }
};
*/
#endif // TLABEL_H
